package com.game.gm.manager;

import org.apache.mina.core.session.IoSession;

import com.game.GMClientServer;
import com.game.gm.message.ReqToolGMCommMessage;
import com.game.utils.MessageUtil;

public class GMManager {
	public static GMManager gMManager;
	
	public static GMManager getInstance() {
		if (gMManager == null) {
			gMManager = new GMManager();
		}
		return gMManager;
	}

	public void sendGMmsg(IoSession iosesion, String comms) {
		ReqToolGMCommMessage reqTool = new ReqToolGMCommMessage();
		reqTool.setComm("dev1577" + comms);
		if (!iosesion.isConnected()) {
			iosesion = GMClientServer.getInstance().reconn(iosesion);
		}
		MessageUtil.tellInnerSession(iosesion, reqTool);
	}
}
